package com.xin.springcloud.service;

import org.springframework.stereotype.Service;

import javax.swing.plaf.TableHeaderUI;
import java.sql.Time;
import java.util.concurrent.TimeUnit;

@Service
public class PaymentService {
    public String paymentInfo_OK(Integer id){
        return "线程池："+Thread.currentThread().getName()+"paymentInfo_OK,id"+id;
    }
    public String paymnetInfo_Timeout(Integer id){
        int timeNumber=3;
        try {
            TimeUnit.SECONDS.sleep(timeNumber);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "线程池"+ Thread.currentThread().getName()+"paymentInfo_Timeout,id"+id+"耗时"+timeNumber+"秒";
    }
}
